package com.wallace.downloadserver.mapper

import com.wallace.downloadserver.bean.User
import com.wallace.downloadserver.pojo.LoginData
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Repository

/**
 * <Description>
 * UserMapper
 * </Description>
 * @author Wallace
 * @Date 2022/1/13 14:51
 */
@Mapper
@Repository
interface UserMapper {
    fun deleteByPrimaryKey(uid: String?): Int
    fun insert(record: User?): Int
    fun insertSelective(record: User?): Int
    fun selectByPrimaryKey(uid: String?): User?
    fun selectByLoginData(loginData: LoginData): User?
    fun selectByPhoneAndPassword(phoneNumber: String, password: String): User?
    fun selectByEmailAndPassword(email: String, password: String): User?
    fun selectByIdCardAndPassword(idCard: String, password: String): User?
    fun selectByUsernameAndPassword(username: String, password: String): User?
    fun updateByPrimaryKeySelective(record: User?): Int
    fun updateByPrimaryKey(record: User?): Int
}